package com.chushouya.manager.dto.admin.clerk;

import com.general.framework.core.lang.Jsons;
import com.chushouya.manager.constants.ClerkStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@ApiModel("业务员详情")
@Data
public class ClerkDetailDTO {

    @ApiModelProperty("id")
    private Long clerkId;

    @ApiModelProperty("业务员姓名")
    private String clerkName;

    @ApiModelProperty("业务员电话")
    private String clerkPhone;

    @ApiModelProperty("公司")
    private String company;

    @ApiModelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("上门区域编码")
    private List<String> areaCode;

    @ApiModelProperty("上门区域")
    private List<String> area;

    @ApiModelProperty("上门城市编码")
    private Long cityCode;

    @ApiModelProperty("上门城市")
    private String city;

    @ApiModelProperty("自动派单的区域")
    private List<Long> adCodeList;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("业务员角色类型")
    private Integer userType;

    @ApiModelProperty("业务员角色类型")
    private String userTypeText;

    @ApiModelProperty("状态")
    private Integer status;

    @ApiModelProperty("工作状态")
    private Integer workStatus;

    @ApiModelProperty("自动派单状态")
    private Integer autoDispatchStatus;

    @ApiModelProperty("状态")
    private String statusDesc;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("业务员可支付渠道")
    private String payPartnerId;

    @ApiModelProperty("业务员可支付渠道")
    private String payType;

    @ApiModelProperty("业务员可支付渠道")
    private List<Long> payPartnerIdList;

    public String getStatusDesc() {
        return ClerkStatusEnum.getDesc(this.status);
    }

    public List<Long> getPayPartnerIdList() {
        return Jsons.parseArray(this.payPartnerId, Long.class);
    }

    public List<Integer> getPayTypeList() {
        return Jsons.parseArray(this.payType, Integer.class);
    }

}
